package com.smalls.redshoes.ui.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.smalls.redshoes.R;

public class LoadingView extends RelativeLayout {
    public LoadingView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    public LoadingView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public LoadingView(Context context) {
        this(context, null);
    }

    private void init() {
        ((ImageView) LayoutInflater.from(getContext()).inflate(R.layout.layout_loading, this, true).findViewById(R.id.live_loading_img)).startAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.anim_loading));
    }
}
